package com.gxar.marketdelivery.interfaces.web.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("分页查询参数")
public class PageParam {

    @ApiModelProperty("当前页")
    private Integer pageNow = 1;

    @ApiModelProperty("每页大小")
    private Integer pageSize = 10;

    public Integer getStartIndex() {
        return (getPageNow() - 1) * getPageSize();
    }
}
